package com.tangsm.spring.boot.strategy.order.service.impl;

import com.tangsm.spring.boot.strategy.order.annotation.OrderAnnotation;
import com.tangsm.spring.boot.strategy.order.enums.OrderEnum;
import com.tangsm.spring.boot.strategy.order.service.OrderService;

import java.math.BigDecimal;

/**
 * 阿里订单
 *
 * @author tangyb
 */
@OrderAnnotation(name = OrderEnum.ALI)
public class AliOrderService implements OrderService {
    /**
     * 下单
     *
     * @param amount 订单金额
     * @return 响应结果
     */
    @Override
    public String placeOrder(BigDecimal amount) {
        return String.format("阿里下单成功，订单金额：%.2f。", amount);
    }
}
